package com.webservice;

import com.carpark.ejb.DAO.DAO;
import com.carpark.ejb.DAO.DaoImpl;
import java.io.Serializable;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.inject.Singleton;

/**
 *
 * @author Krzysztof
 */
@ManagedBean
@Singleton
public class DaoSingleObject implements Serializable {

    @EJB
    DAO dao;

    public DaoSingleObject() {
    dao = new DaoImpl();
        Logger.getLogger(DaoSingleObject.class.getName()).log(Level.SEVERE, "[carpark2013] Tworze obiekt dao");
    }
    

    public DAO getDao() {

        return dao;
    }

    public void setDao(DAO dao) {
        this.dao = dao;
    }

}
